<script type="text/javascript"> 
//上传
var flashvars = {};
flashvars.types = "*";
flashvars.args = "myid=111;yid=222";
flashvars.upUrl = "__APP__/upload/index";
flashvars.fileName = "Filedata";
flashvars.isGet = "1";
flashvars.maxNum = "100";
flashvars.maxSize = "{$config['accessory_size']}";
flashvars.etmsg = "1";
flashvars.ltmsg = "1";
var params = {};
params.wmode = "opaque";
var attributes = {};
swfobject.embedSWF("__PUBLICURL__/js/sapload.swf", "sapload", "450", "25", "9.0.0", "", flashvars, params, attributes);

function sapLoadMsg(t) {
	t = t.replace(/\r\n/g, "");
	var suotu = t.split('|');
	var actup = t.split('.');
	var wjlx = actup[actup.length - 1];
	switch (wjlx) {
	case 'jpg':
	case 'gif':
	case 'bmp':
	case 'png':
	case 'JPG':
	case 'GIF':
	case 'BMP':
	case 'PNG':
		document.getElementById('pic').value = '' + suotu[1] + '';
		$("#thumbnail_list_xh").append('<li><a href="javascript:void 0" onclick="$(\'#pic\',window.frames[\'frame_content\'].document).val(rel); parent.asyncbox.close(\'thumbnail_l\');" rel="' + suotu[1] + '"><img class="thumbnail_list_img" src="' + suotu[1] + '" width="110" height="80" border="0" /></a></li>');
		
		KE.insertHtml('<img src="' + suotu[0] + '" />');
		 break;
	case 'flv':
	case 'mp4':
	case 'mp3':
	case 'wma':
		var html = '<div class="ad_flv">';
		html += '<script type="text/\javascript">';
		html += 'var flashvars = {';
		html += 'src : "' + t + '",';
		html += 'name : "DLCMS",';
		html += 'link : "http://www.dlcms.net/",';
		html += 'skin : "__PUBLICURL__/cmp/vplayer.zip"';
		html += '};';
		html += 'CMP.write("cmp", "500", "360", "__PUBLICURL__/cmp/cmp.swf", flashvars);';
		html += '</\script>';
		html += '</\div>';
		KE.insertHtml(html);
		break;
	case 'swf':
		KE.insertHtml('<embed src="' + t + '" type="application/x-shockwave-flash" width="550" height="400" quality="high" />')
		 break;
	case 'wmv':
	case 'avi':
	case 'mpeg':
	case 'mpg':
		KE.insertHtml('<embed src="' + t + '" type="video/x-ms-asf-plugin" width="550" height="400" autostart="false" loop="true" />')
		 break;
	case 'rmvb':
	case 'rm':
		KE.insertHtml('<embed src="' + t + '" type="audio/x-pn-realaudio-plugin" width="550" height="400" autostart="false" loop="true" />')
		 break;
	default:
		KE.insertHtml('<div class="accessory"><strong>{lang='内容附件'}: </strong><a href="' + t + '">' + t + '</a></div>')
		 break;
	}
}

</script> 
